﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace WineStore.Models
{
    public class Customer
    {
        public int CustomerId { get; set; }

        [Required(ErrorMessage = "Required!")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "Required!")]
        [DataType(DataType.Password)]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Required(ErrorMessage = "Required!")]
        [Compare("Password", ErrorMessage = "The password and confirmation password do not match!")]
        public string ConfirmPassword { get; set; }

        [Required(ErrorMessage = "Required!")]
        public string FullName { get; set; }

        [Required(ErrorMessage = "Required!")]
        public string Address { get; set; }

        [Required(ErrorMessage = "Required!")]
        public string Phone { get; set; }

        public string Email { get; set; }

        public virtual ICollection<Order> Orders { get; set; }
    }
}